package com.itlong.cloud.POJO.DTO.property;

import com.itlong.cloud.POJO.DTO.BaseDTO;
import com.itlong.cloud.POJO.VO.property.PropertyProjectBuildInfoVO;
import com.itlong.cloud.POJO.VO.property.PropertyProjectRoomInfoVO;
import com.itlong.cloud.POJO.VO.property.PropertyProjectUnitInfoVO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <desc>
 * 从Excel(*.xls)导入地址信息数据传输对象(含楼栋列表、单元列表、房间列表,用于保存到数据库)
 * </desc>
 *
 * @createDate 2017-10-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PropertyProjectSaveImportAddressDTO extends BaseDTO implements Serializable {

    private String projectId;

    private List<PropertyProjectBuildInfoVO> buildInfoVOSInDB; //当前项目中数据库中已有的楼栋信息
    private List<PropertyProjectUnitInfoVO> unitInfoVOSInDB; //当前项目中数据库中已有的单元信息
    private List<PropertyProjectRoomInfoVO> roomInfoVOSInDB; //当前项目中数据库中已有的房屋信息，在房屋数量较少时会一次性从数据库取出放入内存
    private Map<String,PropertyProjectImportBuildInfoDTO> addressInfosInFile; //导入文件中的所有地址<buildName,PropertyProjectImportBuildInfoDTO>
//    private Map<String, PropertyProjectImportBuildInfoDTO> buildInfoPOSInFile; //导入文件中的楼栋列表<buildName,BuildInfoPO>
//    private Map<String, Map<String,PropertyProjectImportUnitInfoDTO>> unitInfoPOSInFile; //导入文件中的单元列表<buildName,<unitName,BuildInfoPO>>
//    private Map<String,Map<String,Map<String, PropertyProjectImportRoomInfoDTO>>> roomInfoPOSInFile; //导入文件中的房间列表<buildName,<unitName,<roomNum,BuildInfoPO>>>


    /**
    * <desc>
    *    构造函数,初始化用于存储Excel信息的各种地址对象列表.
    * </desc>
    *
    * @author LewisLouis
    * @createDate 2017-10-20
    */
    public PropertyProjectSaveImportAddressDTO() {
        addressInfosInFile = new HashMap<>();
//        buildInfoPOSInFile = new HashMap<>();
//        unitInfoPOSInFile = new HashMap<>();
//        roomInfoPOSInFile = new HashMap<>();
    }
}
